<include file="./Public/bg/bgheader.html" />
<include file="./Public/bg/bglefter.html" />


<div class=" admin-content">
		<div class="daohang">
			<ul>
				<li><button type="button" class="am-btn am-btn-default am-radius am-btn-xs"> 首页 </li>
			</ul>
		</div>
</div>
	
	


<div class="admin">
   <div class="admin-index">
      <script type="text/javascript">jQuery(".slideTxtBox").slide();</script> 
   			<div class="am-u-sm-12">
            <table width="100%" class="am-table am-table-compact am-table-striped tpl-table-black " id="example-r">
                <thead>
                    <tr>
                        <th>新闻分类ID</th>
                        <th>新闻分类名</th>
                        <th>新闻排序值</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                  <volist	name="newsFatherDetail" id="news">
                    <tr class="gradeX">
                        <td>{$news['type_id']}</td>
                        <if condition="!$news['type_path']">
                        <td>{$news['type_name']}</td>
                        <else />
                        <td>|---{$news['type_name']}</td>
                        </if>
                        <td>{$news['type_order']}</td>
                        <td>
                            <div class="tpl-table-black-operation">
                                <a href="javascript:;">
                                    <i class="am-icon-pencil"></i> 编辑
                                </a>
                                <a href="javascript:;" class="tpl-table-black-operation-del">
                                    <i class="am-icon-trash"></i> 删除
                                </a>
                                <a href="javascript:up({$news['type_order']},{$news['type_id']});" class="tpl-table-black-operation-del">
                                    <i class="am-icon-arrow-up"></i> 提升排序
                                </a>
                                <a href="javascript:down({$news['type_order']},{$news['type_id']});" class="tpl-table-black-operation-del">
                                    <i class="am-icon-arrow-down"></i> 降低排序
                                </a>
                            </div>
                        </td>
                    </tr>
                    </volist>
                    <!-- more data -->
                </tbody>
            </table>
            <script>
            	function up(order,id){
            		// alert(order);
            		// alert(id);
            		$.ajax({
            			type: 'get',
		                url: "{:U('typeorder')}",
		                dataType: 'json',
		                data: {type:'up',type_order:order,type_id:id},
		                success: function(data) {
			                // console.log(data);
			                alert(data);
		                }
            		})
            	}
            	function down(order,id){
            		// alert(order);
            		// alert(id);
            		$.ajax({
            			type: 'get',
		                url: "{:U('typeorder')}",
		                dataType: 'json',
		                data: {type:'down',type_order:order,type_id:id},
		                success: function(data) {
			                // console.log(data);
			                alert(data);
		                }
            		})
            	}
            </script>
	</div>
</div>
<include file="./Public/bg/bgfooter.html" />